NeXT TypedStream Data | 1992-05-10 | 9KB | 183 lines
typedstream
StreamTable
HashTable
Object
[20c]
typedstream
[735c]
typedstream
HashTable
Object
FirstResponder
HeaderClass
%%%%i@@
firstnib
checkSpelling:
alignSelCenter:
unscript:
pasteFont:
runPageLayout:
superscript:
copyRuler:
copyFont:
selectAll:
pasteRuler:
toggleRuler:
showGuessPanel:
alignSelLeft:
paste:
performClose:
arrangeInFront:
subscript:
copy:
alignSelRight:
delete:
orderFrontColorPanel:
underline:
performMiniaturize:
ToTIFF
genericobject_nib
bitmapinfo
compressiontype
equalizeswitch
toTIFFMethod:
doLZW:
doNONE:
doEQUALIZE:
setDefaults:
doJPEG:
doPACKBITS:
[8467c]
typedstream
HashTable
Object
NibData
@@@@s
Storage
{*@@}
[42{*@@}]
File's Owner
CustomObject
Application
MainMenu
MenuTemplate
*@*@ccc
TIFFframes
Matrix
Control
Responder
@:@iiii
MenuCell
ButtonCell
ActionCell
Helvetica
Info Panel...
Help...
ff@@#::s
submenuAction:
Bitmap
menuArrow
Paste
Select All
MyWindow
WindowTemplate
iiii***@s@
GEdit the table, set compression, check equalize if desired, hit RETURN.
Window
bitmapinfo
Compression
FormCell
Width:
Height:
Bitmaps Directory:
red filename:
green filename:
blue filename:
Starting Frame #:
Ending Frame #:
Field:
Convert Bitmaps to TIFF
NXImage
NXreturnSign
Button
NXradio
NXradioH
PackBits
Radio
get default bitmapinfo
Equalize?
NXswitch
NXswitchH
Width
Height
Bitmaps Directory
red filename
green filename
blue filename
Starting Frame #
Ending Frame #
Read Bitmaps
Matrix1!
ToTIFFInstance
ToTIFF
Panel
cahalan64X86
TextField
TextFieldCell
TIFFframes Conversion Program
Version 1.0
1by Robert F. Cahalan
cahalan@clouds.gsfc.nasa.gov
Field1^S
Field2jS
VersionNumbereS
ScrollView
ClipView
ciifffcfffs
[3880c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
\margl40
\margr40
{\colortbl\red0\green0\blue0;}
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul0\fs24 RAW BITMAPS ---> TIFF ANIMATION SEQUENCE
\b0 \
This program combines N triplets of raw bitmap files, each representing an R, G, or B 8-bit image plane, into N 24-bit compressed RGB TIFF files, representing N frames in an animation sequence, and stores the result into a directory of your choice. If you check the "Equalize?" box, then the intensities in each image plane will be histogram-equalized. When you hit return, or click the "Convert..." button, a SavePanel pops up. In the SavePanel you enter the directory name, and the filename without any frame# or tiff extension. For example: "MyMovie.anim/MyMovie". Give the directory a ".anim" extension if you want to view it with Icon, Movie, BackSpace, or MediaView. \
Each input triplet of files for a given frame must be named in the form "Rname.frame#", "Gname.frame#", and "Bname.frame#" where Rname, Gname and Bname are names you select to distinguish the R, G, and B components, and where frame# is an integer specifying the frame to which this triplet will be assigned. The sequence of frame #'s must increase by ones from some minimum starting value, to a maximum ending value, with all intermediate values included. The omission of an intermediate frame will give an error message, after the TIFF frames up to that point have been created. \
To fill in the "bitmapinfo" form with default values, you can hit the "get default bitmapinfo" button. For "historical reasons" the defaults are that your R, G, and B image planes are each 256X256, that they are stored in a directory '~/Library/Images/bitmaps', that they are called 'b7', 'b4', and 'b2', that you have 40 frames beginning with frame #1, and that you want to use JPEG compression, and not equalize. You can link the default '~/Library/Images/bitmaps' to some other directory if you wish, or just edit the default each time. Remember that the width and height must be identical for all frames, that the filenames assigned to the red, green, and blue image planes do not include the framenumber extension, and that the total number of frames is N = ending# - starting# + 1. When you hit RETURN or click the "Convert" button, the SavePanel will allow you to put the compressed TIFF frames anywhere you want. \
This program uses the default JPEG compression factor of 10, but you can change it with CompressionLab (see /NextDeveloper/Demos). Use compression=None if you want to move the images to a Mac.\
\b STRIPPING HEADERS
\b0 \
If you have an image file in some unknown format, but with known header size, and known width and height, you can use the unix utility 'dd' to separate out each image plane into a separate file. For example, file 'bitmap.dat' has a 512-byte header followed by three 512X512 8-bit image planes. The following makes separate raw images:\
Do a 'man dd' to see how this works. The above commands use the default block size of 512, but you can change that. Once you have the separate files, use RGBtoTIFF to put them into a TIFF file.\
\b KNOWN FORMATS
\b0 \
Of course if your image format is GIF, pbm, or any of a number of other ones, you can use ImageViewer by